<%@ page import="cn.ml.web3.dao.StudentDao" %>
<%@ page import="cn.ml.web3.entity.Student" %>
<%@ page import="cn.ml.web3.dao.StudentDaoImpl" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    int id = Integer.parseInt(request.getParameter("id"));
    StudentDao dao = new StudentDaoImpl();
    Student student = dao.get(id);
%>
<form action="doupdateStudent.jsp" method="post">
    <input type="hidden" value="<%=student.getId()%>" name="id">
    ID:<%=student.getId()%><br />
    <input type="text" placeholder="姓名" name="name" value="<%=student.getName()%>">
    <br />
    <input  type="radio" <% if(student.getGender().equals("男")) out.print("checked=\"checked\""); %>  name="gender" value="男">男
    <input type="radio" <% if(student.getGender().equals("女")) out.print("checked=\"checked\""); %>  name="gender" value="女">女
    <br />
    <input type="datetime-local"  value="<%=student.getBornday().toString().replace(' ','T')%>" placeholder="出生日期" name="bornday">
    <br />
    <input type="submit" value="修改">
</form>

</body>
</html>
